package com.itcoon.cloud.framework.i18n.bundle;

import org.springframework.context.support.ReloadableResourceBundleMessageSource;

public class ExBundleMessageSource<T extends Enum<T>> extends ReloadableResourceBundleMessageSource {

    private final Class<T> exResponseEnumClass;

    public ExBundleMessageSource(Class<T> exResponseEnumClass) {
      this.exResponseEnumClass = exResponseEnumClass;
    }

    public Class<T> getExResponseEnumClass() {
        return exResponseEnumClass;
    }

    public T[] getEnums(){
        return exResponseEnumClass.getEnumConstants();
    }
}
